<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include_once ('bd/ModeloBD.php');

class ModeloTipoVehiculo extends ModeloBD {

    private $tipovehicodsx;
    private $tipovehinombre;
    private $tipovehicostoalq;

    public function __construct($tipovehicodsx = "", $tipovehinombre = "", $tipovehicostoalq = "") {
        $this->_oBaseDatos = CBaseDatos::get_instancia();
        $this->_oBaseDatos->conectar();
        $this->_sTabla = "tipovehiculo";
        $this->tipovehicodsx = $tipovehicodsx;
        $this->tipovehinombre = $tipovehinombre;
        $this->tipovehicostoalq = $tipovehicostoalq;
    }

    public function listaTiposVehiculo() {
        $arTiposVehiculos = null;
        $sSQL = "
            SELECT *
            FROM $this->_sTabla ;";
        $arTiposVehiculos = $this->query_object($sSQL);
//        var_dump($arSucursal['usuario'][0]['usucodsx']); //QUERY
//        var_dump($arSucursal[0]->usucodsx); //QUERY_OBJECT
        return $arTiposVehiculos;
    }
    public function getTipoVehiculoById($tipovehicodsx) {
        $arTiposVehiculos = null;
        $sSQL = "
            SELECT *
            FROM $this->_sTabla where tipovehicodsx=".tipovehicodsx;
        $arTiposVehiculos = $this->query_object($sSQL);
//        var_dump($arSucursal['usuario'][0]['usucodsx']); //QUERY
//        var_dump($arSucursal[0]->usucodsx); //QUERY_OBJECT
        return $arTiposVehiculos;
    }

}

?>
